package com.ssm.serviceimp;

import com.ssm.dao.IUserDao;
import com.ssm.model.User;
import com.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import javax.annotation.Resource;

@Service("userService")
public class UserServiceImp implements UserService {
    @Autowired
    private IUserDao userDao;

    @Override
    public List<User> selectAllUser() {
        return userDao.selectAllUser();
    }

    @Override
    public User selectUserByUsername(String username, String password) {return userDao.selectUserByUsername(username, password);}

    @Override
    public void addUser(User user) {userDao.addUser(user);}

    @Override
    public User selectUserByusername(String username) {return userDao.selectUserByusername(username);}

    @Override
    public void updateUser(User user) {userDao.updateUser(user);}
}
